package com.loan.service;
import java.util.Arrays;
import java.util.Map;

import com.jfinal.plugin.activerecord.Page;
import com.loan.model.Param;

public class ParamService extends BaseService<Param>{

	/**
	 * 根据key查找
	 * @return 
	 */
	public Param findByName(String name) {
		return Param.dao.findFirst("select * from param where name=?", name);
	}
	
	/**
	 * 分页数据 
	 */
	public Page<Param> list(int page, int size, Map<String, String> map) {
		return Param.dao.paginate(page, size, buildSql("param",Arrays.asList("user_id", "create_time", "type", "status"),map));
	} 
}
